#pragma once
#include "Channel.h"
#include <list>

using namespace std;

struct CHANNEL_GROUP_INFO
{
	DWORD	dwID;
	TCHAR	cGroupName[64];
	CHANNEL_GROUP_INFO(){
		dwID = 0;
		cGroupName[0] = 0;
	}
};

class CChannelGroup: public IBaseClass
{
public:
	CChannelGroup(CHANNEL_GROUP_INFO* pGroupInfo);
	~CChannelGroup(void);

protected:
	CString		m_strGroupName;
	DWORD		m_dwID;
	BOOL		m_bPreview;

	CChannelList	m_ChannelList;

public:
//property
	DWORD	GetGroupID() const	{	return m_dwID;	}
	LPCTSTR GetGroupName() const{	return m_strGroupName;	}
	void SetGroupName(CString strGroupName)		{	m_strGroupName = strGroupName;	}
	const CChannelList& GetChannelList()		{	return m_ChannelList;	}
	void SetPreview(BOOL bPreview)	{	m_bPreview = bPreview;	}
	BOOL GetPreview()			{	return m_bPreview;	}
	void GetGroupInfo(CHANNEL_GROUP_INFO& GroupInfo);

//implement
	BOOL FindChannel(CChannel* pChannel);
	BOOL AddChannel(CChannel* pChannel);
	BOOL RemoveChannel(CChannel* pChannel);
	void AddChannelToDomainGroup(CChannel* pChannel);
};

typedef list<CChannelGroup*>	CChannelGroupList;
typedef CChannelGroupList::iterator CChannelGroupListIter;

typedef vector<CHANNEL_GROUP_INFO>	CGroupInfoArray;
